From: Colin Walters Date: Tue, 22 Jul 2025 14:52:45 +0000 (-0400) Subject: rust: Fix a few warnings X-Git-Tag: archive/raspbian/2025.7-2+rpi1^2^2~6^2~2^2~9^2 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=fdaaa2f0aa8b9bc26b72309ff1b72ca634d587bc;p=ostree.git rust: Fix a few warnings - Unused imports because we weren't actually exporting the structs from those modules - glib prelude is empty now? - mount namespace usage is conditional Signed-off-by: Colin Walters --- diff --git a/rust-bindings/src/lib.rs b/rust-bindings/src/lib.rs index 9b60dd54..8013c4cf 100644 --- a/rust-bindings/src/lib.rs +++ b/rust-bindings/src/lib.rs @@ -41,11 +41,10 @@ pub use constants::*; #[cfg(any(feature = "v2018_6", feature = "dox"))] mod collection_ref; -#[cfg(any(feature = "v2018_6", feature = "dox"))] -pub use crate::collection_ref::*; mod functions; pub use crate::functions::*; mod mutable_tree; +#[allow(unused_imports)] pub use crate::mutable_tree::*; #[cfg(any(feature = "v2019_3", feature = "dox"))] #[allow(missing_docs)] @@ -67,11 +66,10 @@ pub use crate::repo_checkout_at_options::*; mod repo_transaction_stats; pub use repo_transaction_stats::RepoTransactionStats; mod se_policy; +#[allow(unused_imports)] pub use crate::se_policy::*; #[cfg(any(feature = "v2020_1", feature = "dox"))] mod commit_sizes_entry; -#[cfg(any(feature = "v2020_1", feature = "dox"))] -pub use crate::commit_sizes_entry::*; #[cfg(any(feature = "v2017_4", feature = "dox"))] mod sysroot_write_deployments_opts; #[cfg(any(feature = "v2017_4", feature = "dox"))] @@ -92,5 +90,6 @@ pub mod prelude { #[doc(hidden)] pub use gio::prelude::*; #[doc(hidden)] + #[allow(unused_imports)] pub use glib::prelude::*; } diff --git a/rust-bindings/src/sysroot.rs b/rust-bindings/src/sysroot.rs index 30bccd02..7169057b 100644 --- a/rust-bindings/src/sysroot.rs +++ b/rust-bindings/src/sysroot.rs @@ -8,6 +8,7 @@ use std::path::PathBuf; /// Builder object for `Sysroot`. pub struct SysrootBuilder { path: Option, + #[cfg(any(feature = "v2020_1", feature = "dox"))] mount_namespace_in_use: bool, }